﻿<%@ Page Title="" Language="C#" MasterPageFile="~/NewStdMasterPage.Master" AutoEventWireup="true"
    CodeBehind="MarketingUnsubscribe.aspx.cs" Inherits="AteneoLibri.MarketingUnsubscribe" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Cancellazione dalla newsletter
    </h2>
    <asp:Panel ID="pnlEmail" runat="server">
        <div>
            Inserisci la tua email</div>
        <asp:TextBox ID="txtEmail" runat="server" CssClass="StandardTextBox"></asp:TextBox>
        <asp:RequiredFieldValidator ID="rfvEmail" runat="server" ErrorMessage="* Campo email obbligatorio"
            ValidationGroup="vgNewsletterUnsubscribe" ControlToValidate="txtEmail" Display="Dynamic"
            CssClass="failureNotification">*</asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator ID="revEmail" runat="server" ErrorMessage="** Formato email non valido"
            ValidationGroup="vgNewsletterUnsubscribe" ControlToValidate="txtEmail" Display="Dynamic"
            CssClass="failureNotification" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">**</asp:RegularExpressionValidator>
        <asp:CustomValidator ID="cvUser" runat="server" ErrorMessage="(*) Utente non registrato!"
            CssClass="failureNotification" ValidationGroup="vgNewsletterUnsubscribe" Display="Dynamic"
            ControlToValidate="txtEmail">(*)</asp:CustomValidator>
        <br />
        <asp:Button ID="btnUnsubscribe" runat="server" CssClass="StandardButton" Text="Conferma"
            ValidationGroup="vgNewsletterUnsubscribe" OnClick="btnUnsubscribe_Click" />
        <div class="ValidationBox">
            <asp:ValidationSummary ID="vsUnsubscribe" runat="server" DisplayMode="BulletList"
                ValidationGroup="vgNewsletterUnsubscribe" CssClass="failureNotification" EnableClientScript="true"
                HeaderText="Attenzione:" />
        </div>
    </asp:Panel>
    <asp:Panel ID="pnlUnsubscribeCompleted" runat="server" Visible="false">
        <table>
            <tr>
                <td>
                    <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/icon-success.png" />
                </td>
                <td style="vertical-align: middle; padding-left: 20px;">
                    <asp:Label ID="Label1" Text="Sei stato rimosso dalla newsletter!" runat="server"
                        CssClass="failureNotification"></asp:Label>
                </td>
            </tr>
        </table>
    </asp:Panel>
    <asp:Panel ID="pnlUnsubscribeError" runat="server" Visible="false">
        <table>
            <tr>
                <td>
                    <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/icon-denied.png" />
                </td>
                <td style="vertical-align: middle; padding-left: 20px;">
                    <asp:Label ID="Label2" Text="Errore durante la procedura di de-registrazione dalla newsletter!" runat="server" CssClass="failureNotification"></asp:Label>
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
